<html><head>
<title>个人中心</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<link rel="stylesheet" type="text/css" href="{$app_path}{$static_path}/css/user-center.css">
<link rel="stylesheet" type="text/css" href="{$app_path}{$static_path}/css/page.css">
<include file="./Public/public/public.html" />
</head>
<body>
<include file="./Public/public/top.html" />

<div class="layout-wrap">
    <!--已审核-->
    <div class="layout">
<include file="./Public/public/centerLeft.html" />                      
<link rel="stylesheet" type="text/css" href="{$app_path}{$static_path}/css/savecredit.css">

<div class="right" ms-controller="right" style="min-height: 882px;height:1100px;">

<form id="BorrowForm" action="{:U('Mycredit/insertinvestor')}" method="post" novalidate="true">
<input type="hidden" name="morts" value="" id="mortsid"/>
		<div class="col-sm-10 ">
			<div class="container_page wyjr_area">
				<section>
					<h2>我要投资</h2>
					<p class="info-box" style="display: none;">
					</p>
					<div class="form-horizontal form-wyjr">
						<div class="bg_grey clearfix">
							<div id="result" class="m160">
								<div class="content">
									<span class="popover-close"></span>
									<ul>
										<li>总利息：<span id="zlx" class="font_c_orange"></span>
											总管理费：<span id="zglf" class="font_c_orange"></span></li>
										<li>每月还款：<span id="myfk" class="font_c_orange"></span> 
										(利息：<span id="lx" class="font_c_orange"></span>,
										管理费：<span id="myglf" class="font_c_orange"></span>)</li>
										<li>最后本金需还款：<span id="zhhk" class="font_c_orange"></span></li>
									</ul>
								</div>
							</div>
							
							<div class="form-group" style="margin-bottom: 10px;">
								<label for="input6" class=" control-label col-sm-1"><i>*</i>设置授信：</label>
								<div class="col-sm-8">
									<div class="select_list_area" style="min-height:104px;max-height: 204px">
										<ul style="list-style: none;margin: 0;">
										<volist name="domainTypelist" id="vo">
											<li><label>
											<input type="checkbox" value="{$vo.id}" data-amount="{$vo.id}" name="domainidstr">
											<input name="mortmy" type="number" value="" style="width:90px;" placeholder="授信金额(元)" class='mortclass'/>-
											<input name="ratetmy" type="number" value="" style="width:110px;" placeholder="年利率，25%以内" class='mortrateclass'/>%
											-{$vo.name}
											</label></li>
										</volist>
										</ul>
									</div>
								</div>
							</div>
							<div class="form-group ">
								<label for="sall" class="sall_area">
									<input id="sall" type="checkbox">
									<span>选择全部</span>
								</label>
								<p class="form-control-static" style='margin-left:90px;'>您目前理财宝里可用资金{$creditmoney}元</p>
							</div>
							<div class="form-group">
								<label for="input6" class=" control-label col-sm-1 ">
								<span class="select_l"><i>*</i>投资周期：</span></label>
								<div class="col-sm-6 select-inline">
									<label class="radio-inline">
										<select name="term_begin" class="form-control" id="termMonth">
										<option value="7">7天</option>
										<option value="15">15天</option>
										<option value="30">1个月</option>
										<option value="60">2个月</option>
										<option value="90">3个月</option>
										<option value="120">4个月</option>
										<option value="150">5个月</option>
										<option value="180">6个月</option>
										<option value="210">7个月</option>
										<option value="240">8个月</option>
										<option value="270">9个月</option>
										<option value="300">10个月</option>
										<option value="330">11个月</option>
										<option value="360">12个月</option>
									</select>
									</label>
									<label class="radio-inline">
										-至-										
									</label>
									<label class="radio-inline">
									<select name="term_end" class="form-control">
										<option value="7">7天</option>
										<option value="15">15天</option>
										<option value="30">1个月</option>
										<option value="60">2个月</option>
										<option value="90">3个月</option>
										<option value="120">4个月</option>
										<option value="150">5个月</option>
										<option value="180">6个月</option>
										<option value="210">7个月</option>
										<option value="240">8个月</option>
										<option value="270">9个月</option>
										<option value="300">10个月</option>
										<option value="330">11个月</option>
										<option value="360" selected>12个月</option>
									</select></label>
								</div>
								<span class="form-control-tips "><i class="iconfont"></i>提示文字</span>
							</div>
							<div class="form-group">
								<label for="input6" class=" control-label col-sm-1 "><i>*</i>还款方式：</label>
								<div class="col-sm-5 select-inline">
									<label class="radio-inline">
										<input type="radio" name="inlineOptions" checked="" id="inlineRadio2" value="1">
										每月还息，到期还本
									</label>
								</div>
								<span class="form-control-tips " style="display: none"><i class="iconfont"></i>提示文字</span>
							</div>
					<div class="form-group" style="margin-bottom: 10px;">
								<label for="input6" class=" control-label col-sm-1"><i>*</i>自动投标：</label>
								<div class="col-sm-8">
										<input type="radio" name="is_auto"  value="2"/>
										自动&nbsp;&nbsp;
										<input type="radio" name="is_auto" checked value="1"/>
										不自动
								</div>
							</div>
							
						<div class="pad">
							<div class="form-group">
								<label for="Description" class=" control-label col-sm-1">投资描述：</label>
								<div class="col-sm-9">
							<textarea class="form-control" cols="20" id="Description" name="descrp" rows="6"></textarea>
								</div>
								<p class="form-control-static" style='margin-left:90px;'>请保持最多200个汉字</p>
							</div>
							<div class="btn_area">
							<if condition="$creditmoney eq 0">
							<else/>
								<input type="button" action="confirm_borring" id="LoanApply"
								 class="btn btn-warning btn-xs-block" value="发布投资">
							</if>
							</div>
						</div>
						</div>
					</div>
				</section>

			</div>
		</div>
		</form>
		       
</div>
    
    
    <div class="clr"></div>
        </div>
        <div class="clr"></div>
    </div>
 <div popup="confirm" class="reveal-modal medium" topmeasure="50" topoffset="256" locked="false" animation="none" 
    animationspeed="500" closeonbackgroundclick="true" dismissmodalclass="close-reveal-modal" 
dismissjqobject="[action=&quot;cancel&quot;]" z-index="1001" switch="open" style="z-index: 1002; display: none; top: 650px;">
    <a class="close-reveal-modal" action="closeModal">×</a>
    <div class="confirm-inner">
            <img src="{$app_path}{$static_path}/img/icon_orange_question.png">
            <span action="msg"></span>
    </div>

    <div class="split-dot mb20 text-center"></div>
    <div class="form-row">
        <a action="confirm" class=" button button-orange w40 fl">确定</a>
        <a action="cancel" class=" button button-gray w40 fr">取消</a>
        <div class="clr"></div>
    </div>
</div><div class="reveal-modal-bg" style="display: none;"></div>
<include file="./Public/public/footer.html" />
<script type="text/javascript">
$("#sall").click(function(){
	if($(this).is(':checked')){
		$("input[name='domainidstr']").prop("checked", true);
	}else {
		$("input[name='domainidstr']").prop("checked", false);
	}
});

$('[action=confirm_borring]').click(function () {
	var ids='';
	$('input[name="domainidstr"]:checked').each(function(){ 
		ids=$(this).val()+'-'+$(this).next('.mortclass').val()+'-'+$(this).next().next('.mortrateclass').val()+','+ids;
	});
	$("#mortsid").val(ids);
    showConfirm({
        msg:"您确定发布此域名抵押借款需求?",
        confirmed:function(){
            isCancelling = false;
            $.ajax({
        		type: "POST", 
        		url:$("#BorrowForm").attr("action"), 
        		data:$('#BorrowForm').serialize(),// 你的formid 
        		async: false, 
        		error: function(request) { showModal("system error");}, 
        		success: function(data){
        			if(data.code!='success'){
        				showModal(data.info);
        			}else{
        				showModal(data.info);
        				setTimeout(function() { 
        					location.href='{:U('Mycredit/myinvestorinfo')}';
        					},3000) 
        			}
        		}
        	}).fail(function(){
                isCancelling = false;
            });
        }
    });
});
</script>
</body></html>